const appId = "wxb2fdfad0c42cb98b";
const appSecret = "e574698e79d41fe17965c77e0b60b118";
const jwt = require("jsonwebtoken")

function getToken(openid){
	return jwt.sign({openid:openid},appSecret,{expiresIn:60+60+24});
}

function verifyToken(token){
	return jwt.verify(token,appSecret)
}

module.exports = {
	appId:appId,
	appSecret:appSecret,
	getToken:getToken,
	verifyToken:verifyToken
}
